#ifndef __CCW_COMMON_H__
#define __CCW_COMMON_H__

#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_adc.h"

enum {
    PARAM_ERROR = 1,
    CALL_ERROR = 2,
    NULL_ERROR =3,
};

enum {
    TRUE = 1,
    FALSE = 0,
};

typedef unsigned int ccw_u32;
typedef unsigned short ccw_u16;
typedef unsigned char ccw_u8;
typedef unsigned int ccw_s32;
typedef unsigned short ccw_s16;
typedef unsigned char ccw_s8;
typedef char * ccw_str;
typedef char ccw_bool;

typedef struct __CCW_driver_operation_set {
    ccw_str module_name;
    ccw_str module_version;
    void (*init)(void);
    void (*deinit)(void);
    ccw_s16 (*control)(ccw_u8 id, void *args, ccw_u8 len);
}ccw_ops_t;

typedef struct __gpioNode{
    GPIO_TypeDef* GPIOx;
    ccw_u32 RCC_APB2Periph;
    GPIO_InitTypeDef GPIO_InitStruct;
    ccw_str tag;
    ccw_u8 default_value;
} gpio_node_t;


#endif // __CCW_COMMON_H__